package com.atom.module.common.base;

import java.io.Serializable;
import java.time.LocalDateTime;

public abstract class AbstractEntity implements Serializable {

    // Id
    private Long id;

    // 创建时间
    private LocalDateTime createdTime;

    // 更新时间
    private LocalDateTime updatedTime;

    // 删除状态
    private Boolean deleted = false;

    // 删除状态
    private Boolean status = false;

    // 删除状态
    private Integer version = 0;

    // 排序
    private Integer sortOrder = 0;

    public Long getId() {
        return id;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public Boolean getStatus() {
        return status;
    }

    public Integer getVersion() {
        return version;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    @Override
    public String toString() {
        return "AbstractEntity{" +
                "id=" + id +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                ", deleted=" + deleted +
                ", status=" + status +
                ", version=" + version +
                ", sortOrder=" + sortOrder +
                '}';
    }
}
